-- GENERATED SPELL FOR [Mo'arg Engineer] --


function spell0_16945(pUnit, Event) --@Magnetic Pull,n/a--
pUnit:FullCastSpellOnTarget(31705,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16945', 500, 1)
end

function spell1_16945(pUnit, Event) --@Puncture,n/a--
pUnit:FullCastSpellOnTarget(15976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16945', 10000, 1)
end

function spell2_16945(pUnit, Event) --@Thorium Drill,n/a--
pUnit:FullCastSpellOnTarget(32005,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16945', 621, 1)
end

function Sorts_16945(pUnit, Event)
local choix_sorts_16945 = math.random(0, 2)
if choix_sorts_16945 == 0 then
pUnit:RegisterEvent('spell0_16945', 1, 1)
end
if choix_sorts_16945 == 1 then
pUnit:RegisterEvent('spell1_16945', 1, 1)
end
if choix_sorts_16945 == 2 then
pUnit:RegisterEvent('spell2_16945', 1, 1)
end
end

function mob16945_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16945', math.random(1500, 3000), 1)
end

function mob16945_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16945_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16945_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16945, 1, 'mob16945_Action')
RegisterUnitEvent(16945, 2, 'mob16945_Leave')
RegisterUnitEvent(16945, 3, 'mob16945_Kill')
RegisterUnitEvent(16945, 4, 'mob16945_Die')
